<!-- ZmTabs-->
<template>
  <el-tabs v-bind="$attrs" v-on="$listeners" :type="tabType">
    <slot>
      <el-tab-pane
        v-for="(item, key) in list"
        :label="item[labelKey]"
        :name="item[nameKey]"
        :key="key"
      ></el-tab-pane>
    </slot>
  </el-tabs>
</template>

<script>
export default {
  name: 'ZmTabs',
  props: {
    tabType: {
      type: String,
      default: ''
    },
    list: {
      type: Array,
      default: () => []
    },
    labelKey: {
      type: String,
      default: 'label'
    },
    nameKey: {
      type: String,
      default: 'name'
    }
  },
  data () {
    return {}
  },
  methods: {}
}
</script>
<style lang="scss" scoped>
  .el-tabs {
    & /deep/ .el-tabs__header {
      margin-bottom: 0;
    }
  }
</style>
